const char TrgPin = A0;
const char EcoPin = A1;

float dist;

void setup() {
	Serial.begin(9600);
	pinMode(TrgPin, OUTPUT);
	pinMode(EcoPin, INPUT);
}

void loop() {
	digitalWrite(TrgPin, LOW);
	delayMicroseconds(8);
	digitalWrite(TrgPin, HIGH);
	delayMicroseconds(10);
	digitalWrite(TrgPin, LOW);
	
	dist = pulseIn(EcoPin, HIGH) / 58.00;
	Serial.print("Distance:");
	Serial.print(dist);
	Serial.println("cm");
	delay(300);
}
